package net.osc.service.job;

import net.osc.model.job.CommonJobDetail;

import org.quartz.CronTrigger;
import org.quartz.Trigger;

public interface CommonJobManager {

	String BEAN_NAME_KEY = "bean_name_key";
	String BEAN_METHOD_KEY = "bean_method_key";
	String JOB_KEY = "job_key";
	String JOB_MANAGER_KEY = "job_manager_key";
	String APPLICATION_CONTEXT = "application_context";

	CommonJobDetail getJobById(Long id);

	void activeJob(CommonJobDetail job);

	void disActiveJob(CommonJobDetail job);

	CronTrigger createTrigger(CommonJobDetail job);

	void updateJobByTrigger(CommonJobDetail job, Trigger trigger);

	void saveJob(CommonJobDetail job);

	void delJobs(Long[] ids);
}
